package org.warehouse.dao.engine;

import java.sql.Date;

public enum DataType {
	INTEGER, STRING, DATE;
	
	public static DataType of(Class<?> clazz) {
		if (clazz == Integer.class) {
			return INTEGER;
		} else if (clazz == String.class) {
			return STRING;
		} else if (clazz == Date.class) {
			return DATE;
		} else {
			throw new RuntimeException("Unsupported type of " + clazz.getName());
		}
	}
}
